<template>
	<div>
		<el-table :data="tableData">
			<el-table-column prop="menuName" label="菜单名称"></el-table-column>
			<el-table-column prop="menuIcon" label="图标">
				<template slot-scope="scope">
					<img v-if="scope.row.menuIcon" :src="require('../' + scope.row.menuIcon)">
				</template>
			</el-table-column>
		</el-table>
	</div>
</template>

<script>
	export default {
		name: 'testImg',
		data() {
			return {
				tableData: [{
					menuName: "菜单1",
					menuIcon: "static/menu/hjgl.png"
				}, {
					menuName: "菜单2",
					menuIcon: "static/menu/hjgl.png",
				},{
					menuName: "菜单3",
					menuIcon: null,
				}]
			}
		},
		mounted() {},
		methods: {

		}
	}
</script>

<style scoped lang="scss">
	.levelImg {
		width: 40px;
		height: 40px;
		border-radius: 20px;
	}
</style>
